package per.hx.bs.web.sys.service;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import per.hx.bs.base.domain.PageDO;
import per.hx.bs.base.entity.BsLogDO;

import java.util.Map;

/**
 * @author HuXing
 * @date 2018/3/26  17:22
 */
@FeignClient(value = "Huxingbs-Sys-Service")
public interface SysLogService {

    /**
     * 按条件获取日志列表
     *
     * @param map 查询条件
     * @return 查询结果
     */
    @PostMapping(value = "sys-service/log/list")
    PageDO<BsLogDO> selectList(@RequestBody Map<String, Object> map);

    /**
     * 删除日志
     *
     * @param id 日志Id
     * @return 影响的行数
     */
    @DeleteMapping(value = "sys-service/log/delete")
    int delete(@RequestParam("id") Long id);

    /**
     * 批量 删除 日志
     *
     * @param ids 日志ids
     * @return 影响的行数
     */
    @DeleteMapping(value = "sys-service/log/batchDelete")
    int batchDelete(@RequestParam("ids") Long[] ids);

    /**
     * 清空所有日志
     *
     * @return 影响的行数
     */
    @DeleteMapping(value = "sys-service/log/cleanAll")
    int cleanAll();
}
